<!DOCTYPE html>
<html lang="en" style="background:#fff;">
<head>
    <base href="${basePath}">
    <#include "common/top.html"/>
</head>
<body style="background:#fff;">
<form class="layui-form" modelAttribute="uGroundstation" name="form1" id="form1" method="post">
    <div class="layui-form-item-dept">
        <input name="id" name="id" value="${uGroundstation.id}" type="hidden">

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">计算公式：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="equation" id="equation"
                           value="${uGroundstation.equation}" maxlength="50"
                           placeholder="这里输入计算公式" title="计算公式"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">K值：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="kvalue" id="kvalue"
                           value="${uGroundstation.kvalue}" maxlength="50"
                           placeholder="这里输入K值" title="K值"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">线长：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="xianchang" id="xianchang"
                           value="${uGroundstation.xianchang}" maxlength="50"
                           placeholder="这里输入线长" title="线长"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">安装位置：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="address" id="address"
                           value="${uGroundstation.address}" maxlength="50"
                           placeholder="这里输入安装位置" title="安装位置"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">报警上限：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmHot1" id="alarmHot1"
                           value="${uGroundstation.alarmHot1}" maxlength="50"
                           placeholder="这里输入报警上限" title="报警上限"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">设备类型：</label>
                <div class="layui-input-inline">
                    <@c.dictselect type='deviceType' code='${uGroundstation.deviceType}'>
                        </@c.dictselect>
                </div>
            </div>
        </div>



        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">小时：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmMutat2" id="alarmMutat2"
                           value="${uGroundstation.alarmMutat2}" maxlength="50"
                           placeholder="这里输入小时" title="小时"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">状态：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="state" id="state"
                           value="${uGroundstation.state}" maxlength="50"
                           placeholder="这里输入状态" title="状态"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">突变报警启动：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmMutatUse" id="alarmMutatUse"
                           value="${uGroundstation.alarmMutatUse}" maxlength="50"
                           placeholder="这里输入突变报警启动" title="突变报警启动"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">地下水类型：</label>
                <div class="layui-input-inline">
                    <@c.dictselect type='waterType' code='${uGroundstation.waterType}'>
                    </@c.dictselect>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">供电方式：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="supplyMode" id="supplyMode"
                           value="${uGroundstation.supplyMode}" maxlength="50"
                           placeholder="这里输入供电方式" title="供电方式"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">报警上限：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmWater1" id="alarmWater1"
                           value="${uGroundstation.alarmWater1}" maxlength="50"
                           placeholder="这里输入报警上限" title="报警上限"/>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">孔名称：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="holeName" id="holeName"
                           value="${uGroundstation.holeName}" maxlength="50"
                           placeholder="这里输入孔名称" title="孔名称"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">水位报警启动：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmWaterUse" id="alarmWaterUse"
                           value="${uGroundstation.alarmWaterUse}" maxlength="50"
                           placeholder="这里输入水位报警启动" title="水位报警启动"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">经度：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="longitude" id="longitude"
                           value="${uGroundstation.longitude}" maxlength="50"
                           placeholder="这里输入经度" title="经度"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">所属矿：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="idmine" id="idmine"
                           value="${uGroundstation.idmine}" maxlength="50"
                           placeholder="这里输入所属矿" title="所属矿"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">使用报警功能：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmUse" id="alarmUse"
                           value="${uGroundstation.alarmUse}" maxlength="50"
                           placeholder="这里输入使用报警功能" title="使用报警功能"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">启动GIS：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="gisUse" id="gisUse"
                           value="${uGroundstation.gisUse}" maxlength="50"
                           placeholder="这里输入启动GIS" title="启动GIS"/>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">处理方式：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="process" id="process"
                           value="${uGroundstation.process}" maxlength="50"
                           placeholder="这里输入处理方式" title="处理方式"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">零频：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="lingpin" id="lingpin"
                           value="${uGroundstation.lingpin}" maxlength="50"
                           placeholder="这里输入零频" title="零频"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">报警下线：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmHot2" id="alarmHot2"
                           value="${uGroundstation.alarmHot2}" maxlength="50"
                           placeholder="这里输入报警下线" title="报警下线"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">排序号：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="sortNum" id="sortNum"
                           value="${uGroundstation.sortNum}" maxlength="50"
                           placeholder="这里输入排序号" title="排序号"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">水温报警使用：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmHotUse" id="alarmHotUse"
                           value="${uGroundstation.alarmHotUse}" maxlength="50"
                           placeholder="这里输入水温报警使用" title="水温报警使用"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">孔口深度：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="holeDepth" id="holeDepth"
                           value="${uGroundstation.holeDepth}" maxlength="50"
                           placeholder="这里输入孔口深度" title="孔口深度"/>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">米：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmMutat1" id="alarmMutat1"
                           value="${uGroundstation.alarmMutat1}" maxlength="50"
                           placeholder="这里输入米" title="米"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">手机号：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="phone" id="phone"
                           value="${uGroundstation.phone}" maxlength="50"
                           placeholder="这里输入手机号" title="手机号"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">报警下线：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmWater2" id="alarmWater2"
                           value="${uGroundstation.alarmWater2}" maxlength="50"
                           placeholder="这里输入报警下线" title="报警下线"/>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">孔口高：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="holeHeight" id="holeHeight"
                           value="${uGroundstation.holeHeight}" maxlength="50"
                           placeholder="这里输入孔口高" title="孔口高"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">水位报警类型：</label>
                <div class="layui-input-inline">
                    <@c.dictselect type='alarmWaterType' code='${uGroundstation.alarmWaterType}'>
                    </@c.dictselect>
                </div>
            </div>


            <div class="layui-inline">
                <label class="layui-form-label">分站站号：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="substationCode" id="substationCode"
                           value="${uGroundstation.substationCode}" maxlength="50"
                           placeholder="这里输入分站站号" title="分站站号"/>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">使用定时汇报：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="alarmTimUse" id="alarmTimUse"
                           value="${uGroundstation.alarmTimUse}" maxlength="50"
                           placeholder="这里输入使用定时汇报" title="使用定时汇报"/>
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">纬度：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="latitude" id="latitude"
                           value="${uGroundstation.latitude}" maxlength="50"
                           placeholder="这里输入纬度" title="纬度"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">机构号：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" name="groupId" id="groupId"
                           value="${uGroundstation.groupId}" maxlength="50"
                           placeholder="这里输入机构号" title="机构号"/>
                </div>
            </div>
        </div>


    </div>
</form>
</body>
<script type="text/javascript">

    layui.use(['form', 'table', 'laydate'], function () {
        var form = layui.form;
        var laydate = layui.laydate;

        $("#deviceType  option").each(function () {
            if ($(this).val() == "${uGroundstation.deviceType}") {
                $(this).attr("selected", true)
            }
        });
        $("#waterType  option").each(function () {
            if ($(this).val() == "${uGroundstation.waterType}") {
                $(this).attr("selected", true)
            }
        });
        $("#alarmWaterType  option").each(function () {
            if ($(this).val() == "${uGroundstation.alarmWaterType}") {
                $(this).attr("selected", true)
            }
        });
        form.render();

    });


    function submitHandler() {
        var prefix = basePath + "device/groundstation";

        $.operate.post(prefix + '/updateUGroundstation', $("#form1").serializeArray(), function (result) {
            if (result.status == true) {
                layer.alert(result.msg, function (index) {
                    var index1 = parent.layer.getFrameIndex(window.name); //获取窗口索引
                    parent.layer.close(index1);
                    layer.close(index);
                });
            } else {
                parent.layer.alert(result.msg);
            }
        });
    }
</script>
</body>
</html>
